﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BadmintonBuddy.Models.Club>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	All Badminton Clubs
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">    

    <div class="sort">
    <span>Sort:</span>
    <input type="radio" name="sort" id="Name" value="Name" checked="checked"/>Name
    <input type="radio" name="sort" id="City" value="City" />City    
    </div>
     <div class="boxparent">
     <% int count = 0; %>
     <% foreach (var item in Model){%>
               <% String club_name = item.ClubName.Replace(" ","-"); %> 
               <% if (count % 2 == 0)
                  {%>
                    <div class="box dark">
               <%} %>
               <% else{%>
                    <div class="box light">
               <%} %>

               <h3 class="name"><%: item.ClubName %></h3>
               <div class="address">
                    <%: item.Address %>
                    <div><%: item.City.CityName %>, <%: item.City.State.StateName %> - <%: item.Zipcode %></div>
               </div>        
               <a href="Details/<%: club_name %>" class="morelink">more info</a>
               </div>
               <% count++; %>                
        <%} %>
    </div>
</asp:Content>



